using System;
using System.Windows.Forms;

using FreeFlow.Administration;

namespace FreeFlowAdministrator
{
	/// <summary>
	/// Summary description for RoleAdaptor.
	/// </summary>
	public class RoleAdaptor : Adaptor
	{
    private Role role;
		public RoleAdaptor(Role role)
		{
      this.role = role;
		}

    public override int ImageIndex
    {
      get
      {
        return 6;
      }
    }

    public override string Text
    {
      get
      {
        return role.Name;
      }
    }

    public override Control GetRenderer()
    {
      RoleControl control = new RoleControl();
      control.LoadRole(role);
      return control;
    }

    public override object Object
    {
      get
      {
        return role;
      }
    }
	}
}
